package operation;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * ClassName: Test01
 * Package: operation
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-08-15
 * Time: 20:37
 */

public class Test01 {
    public static void main(String[] args) {

        //创建数组
        int[] arr = new int[10];

        for (int i = 0; i < arr.length; i++) {
            //生产随机数
            arr[i] = (int) ((Math.random() * (99 - 10 + 1)) + 10);
        }

        //将第一个作为最大值
        int max = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if (max < arr[i]){
                max = arr[i];
            }
        }

        System.out.println(Arrays.toString(arr));
        System.out.println(max);

    }
}
